<?php session_start();
include_once 'data/usercheck.php';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>Food Online</title>
	<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
</head>
<body>
  <form id="form1" method="post" action="">
  </form>
  <a href="#"></a>
  <div id="wrapper">
    <div id="logo">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="200" border="0" align="center">
    <tr>
      <td height="30"><FONT size="+6">
        <div align="center">STMS</div></td>
    </tr>
    <tr>
      <td><div align="center">STUDENT MANAGEMENT SYSTEM</div></td>
    </tr>
</table>
  <p>&nbsp;</p>
</div>
    <div id="nav">
      <div id="nav-left">
        <ul>
          <li><a href="view1.php">Home</a></li>
          <li class="orange">
            <div align="left"><a href="http://localhost/stms/pages/data/logout.php">Logout-<?php include_once 'data/databaseconnection.php';session_start();echo $_SESSION['username'];?></a></div>
          </li>
        </ul>
      </div>
      <div id="nav-right">
        <ul>
         
           <li><a href="Aboutus.php">About us</a></li>
          <li><a href="viewhome.php">View</a></li>
          <li><a href="Adminhome.php">Admin</a></li>
          <li><a href="">Contact</a></li>
        </ul>
      </div>
    </div>
    <div id="body">
    <div align="right"><a href="changepass.php">changepassword</a></div>
      <div class="clear">&nbsp;
        <p><a href="view1.php">Show </a><a href="combination.php">Combination</a> <a href="#">Results</a> <a href="#">Attendence</a></p>
        <p>Combinations</p>
        <?php
		  require_once 'data/databaseconnection.php';
		  $pass1=$_SESSION['password'];
		   $pass=md5($pass1);
		   $user=$_SESSION['username'];
			echo "<table border=1>";
			echo "<tr>";
			echo "<td>Level</th>";
			echo "<th>Course1</th>";
			echo "<th>Course2</th>";
			echo "<th>Course3</th>";
			
			
			
			$result=mysql_query("SELECT * FROM combination WHERE Regno in (SELECT Regno FROM user WHERE Password='$pass')");
			
    
			while($row=mysql_fetch_array($result))
			{
		
				echo "<tr><td>".$row['Level'];
				echo "<td>".$row['Course1'];
				echo "<td>".$row['Course2'];
				echo "<td>".$row['Course3'];
				echo "</tr>";
			}
			echo "</table>";
		  ?>
        <p>&nbsp;</p>
      </div>
      <div id="footer">
        <ul>
          <li><a href="view1.php">Home</a> | </li>
          <li><a href="Aboutus.php">About Us</a> | </li>
          <li><a href="">Menu</a> | </li>
          <li><a href="">Contact</a></li>
        </ul>
        <p>copyright &copy; food company</p>
      </div>
    </div>
  </div>
</body>
</html>
